package com.sangananitsolution.fragments;

import android.app.FragmentTransaction;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;

import com.sangananitsolution.gogoproject.R;

public class MyHomePage extends android.app.Fragment {
	Button button;

	@Override
	public View onCreateView(LayoutInflater inflater,
			 ViewGroup container,  Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		View view = inflater.inflate(R.layout.myhomepage, container, false);
		view.findViewById(R.id.imgguide).setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// move to guide  page
				
				android.app.FragmentManager fragmentManager = getFragmentManager();
				android.app.FragmentTransaction fragmentTransaction = fragmentManager
						.beginTransaction();

				fragmentTransaction
						.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);

				fragmentTransaction.addToBackStack(null);
				fragmentTransaction.replace(R.id.mainfragmentlayout, new Guide());
				fragmentTransaction.commit();
				
				
			}
		});
		view.findViewById(R.id.profilelogoMyhomepage).setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				
				android.app.FragmentManager fragmentManager = getFragmentManager();
				android.app.FragmentTransaction fragmentTransaction = fragmentManager
						.beginTransaction();

				fragmentTransaction
						.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);

				fragmentTransaction.addToBackStack(null);
				fragmentTransaction.replace(R.id.mainfragmentlayout, new MyFavouirte());
				fragmentTransaction.commit();
				
			}
		});
		return view;
	}

}


